<script type="application/javascript" src="<%= basePath%>/lib/jquery.min.js"></script>
<script type="application/javascript" src="<%= basePath%>/lib/sui.min.js"></script>
<script type="application/javascript" src="<%= basePath%>/lib/underscore-min.js"></script>
<script type="application/javascript" src="<%= basePath%>/public/js/util.js"></script>
<script type="application/javascript" src="<%= basePath%>/public/js/ui.js"></script>
<script type="application/javascript" src="<%= basePath%>/modules/leader/js/classes.js"></script>

<div class="body_scroll">
    <div class="frame-content">
        <ul class="info_list">
            <li class="li_info">
                <span class="iconfont" style="color: #5396f1">&#xe61f;</span>
                年/班级：
            <span class="sui-dropdown dropdown-bordered table_header">
                <span class="dropdown-inner">
                    <a role="button" data-toggle="dropdown" class="dropdown-toggle">
                        <i class="caret"></i>
                        <span id="inner-select" data-type="school" data-id="<%=school.id%>">
                            全校
                        </span>
                    </a>
                    <ul role="menu" aria-labelledby="status_drop" class="sui-dropdown-menu">
                        <li role="presentation">
                            <a role="menuitem" data-type="school" data-id="<%=school.id%>" tabindex="-1" onclick="innerSelectClicked(event)">
                                全校
                            </a>
                        </li>
                        <% school.grades.forEach(function(grade) {%>
                        <li role="presentation" class="dropdown-submenu">
                            <a role="menuitem" tabindex="-1">
                                <i class="iconfont icon-arrow1 pull-right"></i>
                                <%=grade.name%>
                            </a>
                            <ul class="sui-dropdown-menu">
                                <li role="presentation">
                                    <a role="menuitem" tabindex="-1" data-type="grade" data-id="<%=grade.id%>" onclick="innerSelectClicked(event)">
                                        <%=grade.name%>全部
                                    </a>
                                </li>
                                <% grade.natureClasses.forEach(function(natureClass) { %>
                                <li role="presentation">
                                    <a role="menuitem" tabindex="-1" data-type="class" data-id="<%=natureClass.id%>" onclick="innerSelectClicked(event)">
                                        <%=natureClass.name%>
                                    </a>
                                </li>
                                <%});%>
                            </ul>
                        </li>
                        <% }); %>
                    </ul>
                </span>
            </span>
                <a class="btn-search sui-btn btn-primary table_header_search">查询</a>
            </li>
            <li class="li_footer">
                <div class="table_content_div">
                    <table class="sui-table table-zebra attend_table leader_table_body table-bordered">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>班级名称</th>
                            <th>班级人数</th>
                            <th>教师</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        var classIndex = 1;
                                school.grades.forEach(function(grade) {%>
                        <%grade.natureClasses.forEach(function(natureClass) {%>
                        <tr data-grade="<%=grade.id%>" data-class="<%=natureClass.id%>">
                            <td><%=classIndex%></td>
                            <td><%=natureClass.name%></td>
                            <td><%=natureClass.students.length%></td>
                            <td>
                                <%natureClass.teachers.forEach(function(teacher) {%>
                                <%=teacher.name%>
                                <%})%>
                            </td>
                        </tr>
                        <%
                            classIndex ++;
                        });
                        %>
                        <%});%>
                        </tbody>
                    </table>
                </div>
            </li>
        </ul>
    </div>
</div>
